<template>
  <div id="userLayout" :class="['user-layout-wrapper', device]">
    <div class="container">
      <div class="form-container">
        <div class="form-content-container">
          <div class="form-title"></div>
          <div class="form-content">
            <route-view></route-view>
          </div>
        </div>
      </div>
      <div class="footer">
        <div class="links"></div>
        <div class="copyright">Copyright &copy; 2025 致青春（福建）生物技术有限公司</div>
      </div>
    </div>
  </div>
</template>

<script>
import RouteView from '@/components/layouts/RouteView'
import { mixinDevice } from '@/utils/mixin.js'

export default {
  name: 'UserLayout',
  components: { RouteView },
  mixins: [mixinDevice],
  data () {
    return {}
  },
  mounted () {
    document.body.classList.add('userLayout')
  },
  beforeDestroy () {
    document.body.classList.remove('userLayout')
  }
}
</script>

<style lang="less" scoped>
#userLayout.user-layout-wrapper {
  height: 100%;
  .container {
    width: 100%;
    min-height: 100%;
    background: #f0f2f5 url(~@/assets/bg.png) no-repeat;
    background-size: 100% 100%;
    overflow: auto;
    position: relative;
    .form-container {
      width: 1413px;
      height: 800px;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background: url(/static/img/home-bg.png) no-repeat;
      background-size: 100% 100%;
      .form-content-container {
        float: right;
        width: 45%;
        height: 100%;
        padding: 80px 100px;
        .form-title {
          width: 100%;
          height: 30px;
          margin: 0 auto;
          background: url(~@/assets/title1.png) no-repeat;
          background-size: 100%;
        }
        .form-content {
          margin-top: 125px;
          padding: 0 40px;
        }
      }
    }
    .footer {
      position: absolute;
      width: 100%;
      bottom: 0;
      padding: 0 16px;
      margin: 24px 0 24px;
      text-align: center;

      .links {
        margin-bottom: 8px;
        font-size: 14px;
        a {
          color: rgba(0, 0, 0, 0.45);
          transition: all 0.3s;
          &:not(:last-child) {
            margin-right: 40px;
          }
        }
      }
      .copyright {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }
  }
}
</style>
